package com.example.togethermove.news.viewholder;

import android.util.SparseArray;
import android.view.View;

import androidx.recyclerview.widget.RecyclerView;

/**

 **/
//正名
public class BlogViewholder extends RecyclerView.ViewHolder {
    public BlogViewholder(View itemView) {
        super(itemView);
    }


    private SparseArray<View> mViews = new SparseArray<>();

    //根据id返回view的方法
    public View getViewById(int id) {
        View view = mViews.get(id);
        if (view == null) {
            view = itemView.findViewById(id);
            mViews.put(id, view);
        }

        return view;
    }

}
